package com.xuecheng.teaching.agent;

import com.xuecheng.api.comment.model.dto.CommentDTO;
import com.xuecheng.api.comment.model.qo.CommentModel;
import com.xuecheng.common.constant.XcFeignServiceNameList;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import feign.Param;
import org.mapstruct.ObjectFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

/**
 * @author by wangwei
 * @date 2021/12/25.
 */
@FeignClient ( value = XcFeignServiceNameList.XC_COMMENT_SERVICE )
public interface CommentApiAgent {
    String SERVICE_CONTEXT_PRE = "comment";

    @GetMapping(SERVICE_CONTEXT_PRE + "/m/course-comment/list-all")
    PageVO<CommentDTO> queryMCourseCommentList(@SpringQueryMap PageRequestParams params);

    @DeleteMapping(SERVICE_CONTEXT_PRE+"/m/delete-comment/{commentId}")
    void deleteComment(@PathVariable Long commentId);

    @DeleteMapping(SERVICE_CONTEXT_PRE+"/m/delete-comment/batch-del/{request}")
    void deleteComments(@PathVariable String request);

    @GetMapping(SERVICE_CONTEXT_PRE+"/course-comment/list")
    PageVO<CommentDTO> queryCourseCommentList(@SpringQueryMap PageRequestParams params, @RequestBody CommentModel commentModel);
}
